﻿<Application
    x:Class="JustinAngel.MindwaveSensor.WP8.TestApp.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:local="clr-namespace:JustinAngel.MindwaveSensor.WP8.TestApp">

    <!--Application Resources-->
    <Application.Resources>
        <!--<local:LocalizedStrings x:Key="LocalizedStrings"/>-->
    	<ResourceDictionary>
    		<ResourceDictionary.MergedDictionaries>
    			<ResourceDictionary Source="/JustinAngel.MindwaveSensor.WP8;component/Themes/Generic.xaml"/>
    		</ResourceDictionary.MergedDictionaries>
    		<Style x:Key="RectImageButton" TargetType="Button">
    			<Setter Property="Background" Value="Transparent"/>
    			<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
    			<Setter Property="Foreground">
    				<Setter.Value>
    					<SolidColorBrush Color="Black"/>
    				</Setter.Value>
    			</Setter>
    			<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
    			<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
    			<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/>
    			<Setter Property="Padding" Value="10,5,10,6"/>
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="Button">
    						<Grid Background="Transparent">
    							<VisualStateManager.VisualStateGroups>
    								<VisualStateGroup x:Name="CommonStates">
    									<VisualState x:Name="Normal"/>
    									<VisualState x:Name="MouseOver"/>
    									<VisualState x:Name="Pressed">
    										<Storyboard>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
    												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneButtonBasePressedForegroundBrush}"/>
    											</ObjectAnimationUsingKeyFrames>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
    												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneAccentBrush}"/>
    											</ObjectAnimationUsingKeyFrames>
    										</Storyboard>
    									</VisualState>
    									<VisualState x:Name="Disabled">
    										<Storyboard>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
    												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
    											</ObjectAnimationUsingKeyFrames>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
    												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
    											</ObjectAnimationUsingKeyFrames>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
    												<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
    											</ObjectAnimationUsingKeyFrames>
    										</Storyboard>
    									</VisualState>
    								</VisualStateGroup>
    								<VisualStateGroup x:Name="FocusStates"/>
    							</VisualStateManager.VisualStateGroups>
    							<Border x:Name="ButtonBackground" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" CornerRadius="0" Margin="{StaticResource PhoneTouchTargetOverhang}">
    								<ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" VerticalContentAlignment="Bottom" HorizontalContentAlignment="Left" Padding="3,3,0,0"/>
    							</Border>
    						</Grid>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    			<Setter Property="MinWidth" Value="225"/>
    			<Setter Property="MinHeight" Value="225"/>
    		</Style>
    	</ResourceDictionary>
    </Application.Resources>

    <Application.ApplicationLifetimeObjects>
        <!--Required object that handles lifetime events for the application-->
        <shell:PhoneApplicationService
            Launching="Application_Launching" Closing="Application_Closing"
            Activated="Application_Activated" Deactivated="Application_Deactivated"/>
    </Application.ApplicationLifetimeObjects>

</Application>